package com.pubinfo.passbook.engine.cell.logic.medicine;

import com.pubinfo.passbook.common.model.dto.witeoff.MedicineOnJobOrRetireDTO;
import com.pubinfo.passbook.common.model.ruler.PayInformation;

import java.math.BigDecimal;
import java.util.List;

/**
 * 是否门诊
 *
 * @author zhouch
 * @date 2022/1/10 10:33
 */
public class OutpatientlUnit extends MedicineLogicUnit {

    @Override
    public Boolean then(MedicineOnJobOrRetireDTO data, BigDecimal result) {
        List<PayInformation> payInformations = cache.getPayInformationData();
        return payInformations.get(0).getReimbursementType() == 0;
    }


    @Override
    public String getName() {
        return "是否门诊";
    }
}
